package com.neusoft.tyut.bu.demo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Emp {
    private Integer empno;
    private String ename;
    private Dept dept;

    public static void main(String[] args) {
        Emp emp =  Emp.builder()
                .empno(7369)
                .ename("smith")
                .dept(
                        Dept.builder()
                                .deptno(10)
                                .dname("研发部")
                                .loc("太理科技楼")
                                .contect(
                                        Contect.builder()
                                                .emp(Emp.builder()
                                                        .empno(8080)
                                                        .ename("zhangsan")
                                                        .dept(Dept.builder().build())
                                                        .build())
                                                .address("太理")
                                                .phone("123456")
                                                .build()
                                )
                                .build()
                )
                .build();
        System.out.println(emp);
    }

}
